<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=1200, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="myDiv">
        <p id='myPara'>test</p>
    </div>
    <script>
        const oDiv = document.getElementById('myDiv')
        //const oPara = oDiv.getElementsByTagName('p')
        const oPara = oDiv.querySelector("#myPara")
        console.log(oDiv)
        console.log(oPara)
    </script>
</body>
</html>